﻿@model asMeishi.web.Models.shop
@using publicLibrary;
@using asMeishi.web.Models;

@{
    historyC<food> hc = new historyC<food>();
    var ht = hc.get().Take(10);
            
    Layout = null;

    string fid = ViewBag.fid;
    
    
}

<div class="shopBoxContent" id="itemsPanle">
   <div style=" position:relative">
    @Html.Action("getFoodsMenu", "shop", new {id=Model.Id })
    <div id="foodCommentFormPanel" class="foodCommentFormPanel">
        <div style="width:650px;">
            <div class="handle" style="" onclick="foodCommentFormPanle_toggle();">
                参与推荐
            </div>
            <form id="foodCommentForm" action="/shop/addFoodAndImpress/@Model.Id" method="post" style="display:inline-block;*display:inline;zoom:1;min-height:47px;width:594px" class="sbcolor">
                <button type="button" onclick="foodCommentFormSubmit()" class="btn btn-yellow" style="float:right; margin:10px; ">提交</button>
                <ul id="foodCommentFormContent" style=" padding-bottom:3px; margin-top:-2px;">
                    <li style="color:#fff; font-size:12px; padding-top:2px; padding-bottom:2px;">
                        <span class="block" style="width:95px; ">菜肴名称</span>
                        <span class="block" style="width:30px; ">价格</span>
                        <span>简单评价(可略)</span>
                    </li>
                    <li style="padding-top:0px; ">
                        <input type="text" class="foodName" name="foodName" style="" />
                        <input type="text" class="foodImpress" name="foodPrice" style="width:30px;"/>
                        <input type="text" class="foodImpress" name="foodIntro" style="width:260px;"/>
                        <button class="addBtn_s" onclick="addFoodCommentItem()" type="button" style="vertical-align:middle"></button> 
                        <button type="button" class="delBtn_s hidden" onclick="delFoodCommentItem(this)" style="margin-top:0px;" ></button>
                    </li>
                </ul>
            </form>
        </div>
        </div>
   </div>


    @if (!string.IsNullOrWhiteSpace(fid)) { 
        @Html.Action("detail", "food", new { id = fid})
    }
    else
    {
        <ul class="shopFoodHTList" id="shopItemList">
        <span></span>
        @foreach (var item in ht)
        {
            string _class = item.type == historyTypeEnum.建立.ToString() ? "cbcolor" : "";
            <li class="@_class" id="item_@item.Id">
                <span class="datetime">@item.dateTime.ToString("yy-MM-dd hh:mm")</span><br />
                <a href="@item.userId" class="author">@@@item.userName</a>
                <span>@item.type</span>
                <a href="@item.targetId">@item.targetField</a>  
                <span class="info">@item.value</span>
                <br />
            
            
            </li>
        }
       </ul>
    }
</div>

